import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Login from '../views/Login'
import Regist from '../views/Regist'
import Home from '../views/Home'
import updateUser from '@/views/updateUser'
import addUser from '@/views/addUser'
import fal from '@/views/500'
import test from '@/views/test'
import upload from '@/components/upload/singleUpload'
import torequest from '@/views/torequest'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      // 登录 路由路径
      path: '/Login',
      // 路由名称
      name: 'Login',
      // 跳转到组件
      component: Login
    },
    {
      // 注册 路由路径
      path: '/Regist',
      // 路由名称
      name: 'Regist',
      // 跳转到组件
      component: Regist
    },
    {
      // 路由路径
      path: '/upload',
      // 路由名称
      name: 'upload',
      // 跳转到组件
      component: upload
    },
    {
      // 路由路径
      path: '/torequest',
      // 路由名称
      name: 'torequest',
      // 跳转到组件
      component: torequest
    },
    {
      // 主页面
      path:'/Home',
      name:'Home',
      component:Home
    }
    ,
    {
      path:'/updateUser/:id',
      // path:'/updateUser/:id,:name,:age',
      component:updateUser
    }
    ,
    {
      path:'/Home/addUser',
      component:addUser
    }
    ,
    {
      path:'/fal',
      component:fal
    }
    ,
    {
      path:'/test',
      component:test
    }
  ]
})
